package com.pope945.mypanel;
import java.awt.BorderLayout;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.JLabel;

import javax.swing.JPanel;
import org.jdesktop.application.Application;
import org.jdesktop.jdic.browser.WebBrowser;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class NewsPanel extends JPanel {
	private JLabel jLabel1;

	public NewsPanel() {
		
		initGUI();
		
		
		
	}
	
	private void initGUI() {
		try {
			{
				this.setPreferredSize(new java.awt.Dimension(490, 324));
				
				WebBrowser webBrowser;
				
				try {
		        	webBrowser = new WebBrowser(new URL("http://news.google.com/nwshp?hl=zh-CN&tab=wn"));

		        } catch (MalformedURLException e) {
		            System.out.println(e.getMessage());
		            return;
		        }
		        this.setLayout(new BorderLayout());
		        this.add(webBrowser,BorderLayout.CENTER);
		       

				
			}
			Application.getInstance().getContext().getResourceMap(getClass()).injectComponents(this);
		} catch(Exception e) {
			e.printStackTrace();
		}
	}

}
